package AI;

import java.awt.Point;
import java.util.List;
import java.util.Map;

import Actor.Actor;
import Actor.IfaceCharAction;
import Map.Floor;
import Map.Tile;
import Util.CollisionUtil;
import View.ViewManager;

public class BresenhamLineAIImproved extends BresenhamLineAI{

	public BresenhamLineAIImproved(List<Actor> _actor, List<Actor> _monseter,
			Floor _map,Map<List<Point>, Integer> bullets ,ViewManager _manager ) {
		super(_actor, _monseter, _map,bullets,_manager);
		// TODO Auto-generated constructor stub
	}
	@Override
	public void think() {

		super.think();
		for (Actor monster1 : monseters) {
			for (Actor monster2 : monseters) {
				if(monster2==monster1)
					continue;
				if(CollisionUtil.getStance(monster2,monster1)>2)continue;
				
				IfaceCharAction command = PointToComandConvertor.getMovObjectDirection(monster2,monster1);
				if (command != null) {
					command.doAcion(map,getManager());
				}

			}
		}
	}
}
